package com.jiaai.web.html;

import com.alibaba.dubbo.config.annotation.Reference;
import com.jiaai.auth.model.AccessUser;
import com.jiaai.filter.aop.TokenIntercept;
import com.jiaai.member.api.IMemberApi;
import com.jiaai.util.RequestUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by Administrator on 2018/3/24.
 */
@RequestMapping("/html/lv")
@Controller
public class LvHtml5Controller {
    @Reference
    private IMemberApi iMemberApi;

    @GetMapping("/member")
    @TokenIntercept(checkVisitor = true)
    public String member(ModelMap modelMap) throws Exception{
        AccessUser accessUser = RequestUtils.getUser();
       // iMemberApi.getMyInfo(accessUser.getUserId());
        modelMap.addAttribute("mId", accessUser.getUserId());
        return "Member";
    }
}
